<?php 
namespace app\admin\controller;

use think\Controller;
use app\model\Order;

class Orderdo extends Controller{
	// 查看订单列表
	public function getOrder(){
		$orders = Order::getListByPage(10);
		$this->assign("orders",$orders);
		return $this->fetch();
	}

	// 查看已完成订单列表
	public function getDoneOrder(){
		$orders = Order::getDoneByPage(10);
		$this->assign("orders",$orders);
		return $this->fetch();
	}

	// 查看已删除订单列表
	public function getDeleteOrder(){
		$orders = Order::getDeleteByPage(10);
		$this->assign("orders",$orders);
		return $this->fetch();
	}

	// 取消订单
	public function removeOrder(){
		$order = Order::get(input("order_id"));
		$order->is_delete = 1;
		$order->save();
		return getResponse(0,$order);
	}
}


 ?>